<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Vue组件的事件传递</title>
    <!-- 引入vue.js -->
    <script src="vue/vue.js"></script>
</head>

<body>
    <div id="app-7">
        <say-something who="狮王">战术后仰</say-something>
        <say-something2 who="太祖">笑而不语</say-something2>
    </div>

    <script>

        Vue.component('say-something', {
            props: ['who'],
            template: '<div>{{who}}<slot></slot></div>',
        })
        Vue.component('say-something2', {
            props: ['who'],
            template: '<div>{{who}}</div>',
        })
        var app7 = new Vue({
            el: '#app-7',

        })
    </script>
</body>

</html>
